import request from '@/utils/http'
const api = new Object()
// let api = {}


//获取帮助问题列表
api.gethelplist = params => request('post', '/api/helplist/index', params)

//获得已开发票
api.getmyfp = params => request('post', '/api/fapiao/getmyfapiao', params)
//申请开发票
api.applyfapiao = params => request('post', '/api/fapiao/applyfapiao', params)
//添加发票抬头
// https://wyc.jslhkj.cn/api/fapiao/addheader
api.addheader = params => request('post', '/api/fapiao/addheader', params)
//获取发票抬头列表
api.getmyfh = params => request('post', '/api/fapiao/getmyfh', params)
//删除发票抬头 根据id
api.delmyfh = params => request('post', '/api/fapiao/deleteheader', params)

//根据status 获取 不同类
api.getgoodcate = params => request('post', '/api/index/getgoodsbyonecate', params)
// https://wyc.jslhkj.cn/api/index/getbannervideo
//视频故事
api.getbannervideo = params => request('post', '/api/index/getbannervideo', params)
//获取图文列表
api.getartcle = params => request('post', '/api/artcle/index', params)
// 获取当前所在区域
api.getarea = params => request('post', '/api/index/getarea', params)
// 获取切换选择的地址
api.getqharea = params => request('post', '/api/index/getqharea', params)
// 获取分类
api.getcategory = params => request('post', '/api/index/getcategory', params)
//  获取商品
api.getcateshop = params => request('post', '/api/index/getcateshop', params)
// 搜索商品
api.search = params => request('post', '/api/index/search', params)
// 搜索历史
api.getrecordSer = params => request('post', '/api/index/getrecordSer', params)
// 删除全部历史
api.delrecordSer = params => request('post', '/api/index/delrecordSer', params)
//获取米粒商城列表

// 获取商品评论
api.getMessGoods = params => request('post', '/api/goods/messGoods', params)
// 直接购买数据（结算数据）
api.buydata = params => request('post', '/api/goods/buydata', params)
// 直接购买支付
api.goodsPay = params => request('post', '/api/goods/pay', params)
// 识别身份证号
api.ocrIdcard = params => request('post', '/api/common/ocrIdcard', params)
// 识别B超单/出生证明
api.ovrFile = params => request('post', '/api/common/ovrFile', params)
//获取米粒商城商品
api.miliGoods = params => request('post', '/api/goods/milishop', params)


// 增加购物车中某条数量
api.addGoods = params => request('post', '/api/cart/inc', params)
// 减少购物车中某条数量
api.reduceGoods = params => request('post', '/api/cart/sub', params)
// 购物车结算
api.cartClose = params => request('post', '/api/cart/cartClose', params)
// 购物车支付
api.cartPay = params => request('post', '/api/cart/pay', params)
//获取所有订单列表
api.getOrders = params => request('post', '/api/order/getOrders', params)
// 订单详情
api.getorderDet = params => request('post', '/api/order/getorderDet', params)
// 获取薅羊毛增选服务
api.getgiveServerList = params => request('post', '/api/goods/getgiveServer', params)
// 取消订单
api.offorder = params => request('post', '/api/order/offorder', params)
// 确认订单
api.conorder = params => request('post', '/api/order/conorder', params)
// 评价
api.messorder = params => request('post', '/api/order/messorder', params)
// 退款退货
api.refound = params => request('post', '/api/order/refound', params)
// 订单支付
api.orderAllPay = params => request('post', '/api/order/pay', params)
// 邮寄
api.youji = params => request('post', '/api/order/youji', params)

// 地址列表
api.getRessList = params => request('post', '/api/address/index', params)
// 删除地址
api.delress = params => request('post', '/api/address/del', params)
// 地址详情
api.ressDetail = params => request('post', '/api/address/detail', params)
// 修改默认地址
api.setDefault = params => request('post', '/api/address/setDefault', params)
// 获取默认地址
api.getDefaultRess = params => request('post', '/api/address/getAddress', params)

// 修改会员个人信息
api.profile = params => request('post', '/api/user/profile', params)
// 获取提现说明
api.getdrawdet = params => request('get', '/api/confdom/getdrawdet', params, 'queryString')
// 积分明细
api.getScoreDetail = params => request('post', '/api/user/getScoreDetail', params)
// 提现
api.posit = params => request('post', '/api/user/posit', params)
// 我的分享码
api.getmyQr = params => request('get', '/api/user/getmyQr', params, 'queryString')
// 手机号授权登录
api.login = params => request('post', '/api/user/login', params)
// 录入用户预产期
api.expectDate = params => request('post', '/api/user/expectDate', params)
// 获取功能列表
api.getjmconf = params => request('post', '/api/Jmconf/getjmconf', params);

// 商家端
// 商家入驻
api.addEnter = params => request('post', '/api/merchant/enter', params)
// 判断商家入驻
api.merchEnter = params => request('post', '/api/user/merch', params)
// 商家端登陆
api.merchLogin = params => request('post', '/api/merchant/login', params)
// 商家订单
api.merchOrderList = params => request('post', '/api/merchant/order', params)
// 发布项目
api.merchNewProject = params => request('post', '/api/merchant/newProject', params)
// 确认订单
api.finshOrder = params => request('post', '/api/merchant/finshOrder', params)
// 商家信息
api.getMerchInfo = params => request('post', '/api/merchant/getInfo', params)
// 设置商家头像昵称
api.setMerchInfo = params => request('post', '/api/merchant/setInfo', params)
// 查看我的项目
api.getMyProject = params => request('get', '/api/merchant/myProject', params, 'queryString')

// 富文本之类
api.getbannertext = params => request('get', '/api/index/getbannerss', params)
// 客服电话
api.mykefu = params => request('get', '/api/confdom/mykefu', params, 'queryString')
// 获取用户协议
api.getuserdet = params => request('get', '/api/confdom/getuserdet', params, 'queryString')
// 获取隐私协议
api.getpoldet = params => request('get', '/api/confdom/getpoldet', params, 'queryString')
// 获取服务协议
api.getserdet = params => request('get', '/api/confdom/getserdet', params, 'queryString')

// 获取爱车信息
api.getbikeinfo = params => request('get', '/api/ebike/getbikeinfo', params, 'queryString')
// 获取icon
api.Geticon = params => request('post', '/api/Geticon/index', params, 'queryString')
// 添加意见反馈
api.addfeedback = params => request('post', '/api/app/index/feedback', params, 'queryString')
// 签到列表
api.getqiandaolist = params => request('post', '/api/mili/getqiandaolist', params, 'queryString')
// 签到
api.addqd = params => request('post', '/api/mili/addqd', params, 'queryString')
// 今日是否签到
api.issign = params => request('post', '/api/Mili/issign', params, 'queryString')
// 获取我的优惠券列表
api.getmycouponlist = params => request('post', '/api/coupon/getmycouponlist', params, 'queryString')
// 获取优惠券
api.addcoupon = params => request('post', '/api/coupon/addcoupon', params, 'queryString')
// 获取可获取优惠券
api.getcouponlist = params => request('post', '/api/coupon/getcouponlist', params, 'queryString')
// 获取车辆类型
api.getbiketype = params => request('post', '/api/Ebike/getbiketype', params, 'queryString')
// 获取浏览记录
api.getstrufflist = params => request('post', '/api/Struff/getstrufflist', params, 'queryString')
// 绑定车辆设备
api.bindbike = params => request('post', '/api/Ebike/bindbike', params, 'queryString')
// 预约试骑
api.addyuyue = params => request('post', '/api/yuyue/addyuyue', params, 'queryString')
// 活动和品牌
api.activity = params => request('post', '/api/Activity/index', params, 'queryString')
// 获取积分商城列表
api.getmiligoods = params => request('post', '/api/Miligoods/getmiligoods', params, 'queryString')
//获取积分商城详情
api.getmilisinge = params => request('post', '/api/miligoods/getdefail', params)
// 获取问卷调查
api.question = params => request('post', '/api/Question/index', params, 'queryString')
//根据订单id 获取订单地址
api.getorderaddress = params => request('get', '/api/order/modifyAddress', params)
api.getorderaddressd = params => request('post', '/api/order/modifyAddress', params)

// 添加骑行问卷
api.addquestionnaire = params => request('post', '/api/cycling/index/questionnaire', params)

// 骑行活动报名
api.cyclingSignup = params => request('post', '/api/cycling/activity/signup', params)
// 骑行活动列表
api.activityList = params => request('post', '/api/cycling/activity/list', params)
// 骑行活动详情
api.activityDetail = params => request('post', '/api/cycling/activity/detail', params)

// 骑行服务列表
api.serviceList = params => request('post', '/api/cycling/index/service_list', params)
// 骑行服务详情
api.serviceDetail = params => request('post', '/api/cycling/index/service_detail', params)

//获取库存信息
api.stockquantity = params => request('post', '/api/goods/stockquantity', params)

// 米粒商城详情
api.miligoodsDetail = params => request('post', '/api/miligoods/detail', params)
// 订单确认
api.confirmOrder = params => request('post', '/api/cart/confirm_order', params)



// update 2024-11-4
// 登录
api.getOpenId = params => request('post', '/api/account/mini/getOpenId', params)
// 获取用户信息
api.getuserinfo = params => request('post', '/api/account/mini/getUserinfo', params)
// 修改用户信息
api.setuserinfo = params => request('post', '/api/account/mini/setUserinfo', params)

// 设置地址
api.address = params => request('post', '/api/address/mini/addAddress', params)
// 地址列表
api.getRessList = params => request('post', '/api/address/mini/list', params)
// 删除地址
api.delress = params => request('post', '/api/address/mini/del', params)
// 地址详情
api.ressDetail = params => request('post', '/api/address/mini/detail', params)
// 修改默认地址
api.setDefault = params => request('post', '/api/address/mini/setDefault', params)
// 获取默认地址
api.getDefaultRess = params => request('post', '/api/address/mini/getDefault', params)

// 获取分类下的商品
api.getcategoods = params => request('post', '/api/goods/mini/getcategoods', params)
// 获取商品列表
api.getGoodsList = params => request('post', '/api/goods/mini/getGoodsList', params)
// 商品详情
api.getGoodDetails = params => request('post', '/api/goods/mini/details', params)
//获取主题商品列表
api.getMainly = params => request('post', '/api/goods/mini/getMainly', params)

// 获取订单列表
api.getOrderList = params => request('post', '/api/order/mini/getOrderList', params)

// 添加到购物车
api.addCart = params => request('post', '/api/cart/mini/add', params)
// 购物车列表
api.getCartList = params => request('post', '/api/cart/mini/list', params)
// 删除购物车中某条
api.delGoods = params => request('post', '/api/cart/mini/del', params)

// 轮播图
api.getbanner = params => request('post', '/api/banner/mini/getbanner', params)

export default api